public class Car {
    //轮胎，车架，底盘组成，有外观，价格
    String luntai, chejia, dipan, yanse;
    int jiage;
    Engine d = new Engine();

    public void go() {
        System.out.println("轮胎：" + luntai);
        System.out.println("车架：" + chejia);
        System.out.println("底盘：" + dipan);
        System.out.println("颜色：" + yanse);
        System.out.println("价格：" + jiage);
        d.show();
        d.start();
    }
}
public class Engine {
    //排量，重量，品牌，马力
    public double displacement;
    public double weight;
    public String brand;
    public double horsePower;

    public void show() {
        System.out.println("displacement: " + displacement + " l");
        System.out.println("weight: " + weight + " KG");
        System.out.println("brand: " + brand);
        System.out.println("horsePower: " + horsePower + " HP");
    }

    public void start() {
        System.out.println("压缩空气>雾化汽油>点火>排废烟");
    }
}
//汽车由发动机，轮胎，车架，底盘组成，有外观，价格等属性，要求发动机是个类，
// 其他属性用字符串表示；有启动，停止，鸣笛等方法,发动机有排量，重量，品牌，马力等属性;
//汽车启动 由  发动机完成，分为   压缩空气，雾化汽油，点火，排废烟四部完成。
//用oo的思想模拟实现这个过程。
public class Oppzy01 {
    public static void main(String[] args) {
        Car c = new Car();
        c.luntai = "橡胶";
        c.chejia = "大";
        c.dipan = "高";
        c.yanse = "红";
        c.jiage = 123456;
        c.d.brand = "保时捷";
        c.d.displacement = 3.2;
        c.d.horsePower = 13.2;
        c.d.weight = 300;
        c.go();
    }
}